package com.threeti.jiayusms.domain.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.threeti.jiayusms.framework.domain.support.DefaultDomainEntity;

public abstract class TemplateIdGenerator {
	protected static SimpleDateFormat dataFormatter = new SimpleDateFormat("yyyyMMdd");
	
	public static String generateTempalteIdBy(String templateType, DefaultDomainEntity domWithId) {
		return templateType + "-" + dataFormatter.format(new Date())+"-"+domWithId.getId();
	}
}
